package com.manager.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.manager.pojo.User;
import com.manager.service.RedisService;

@Controller
@RequestMapping(value="/redis")
public class RedisController {
	
	@Autowired
	private RedisService service;
	 
    @RequestMapping(value="/addUser")
    public String addUser(){
    	User user = new User();
    	user.setUseranme("wang");
    	user.setPassword("abc");
    	service.add(user);
    	return "redirect:/addSuccess.jsp";
    }
}
